{% extends 'base/base.html' %}

{% block title %}
<title>agem搜索结果</title>
{% endblock %}

{% block body %}
    <div class="body_content_wrapper pb-2">
        <div class="container xcontainer">
            <section class="bg-dark rounded-3 g-0 p-3 text-white">
                <div id="search_results_wrapper">
                    {% if query %}
                    <h6 class="search_keywords">
                        <span class="text-danger"></span>
                        搜索结果如下：
                    </h6>
                    {% for result in page.object_list %}
                    <div id="cata_video_list" class="row">
                        <div class="col-md-12">
                            <div class="card cata_video_item py-4">
                                <div class="d-flex">
                                    <div class="video_cover">
                                        <div class="video_cover_wrapper">
                                            <a href='{% url "main:detail" result.object.id %}' class="d-block" title="{{ result.object.title }}"><img class="video_thumbs lazyload" src="https://cdn.aqdstatic.com:966/age/{{ result.object.imglink }}" data-original="https://cdn.aqdstatic.com:966/age/{{ result.object.imglink }}" alt="{{ result.object.title }}" style="display: inline;"></a>
                                            <span class="video_play_status rounded text-truncate">第{{ result.object.episode }}集</span>
                                        </div>
                                    </div>
                                    <div class="card-body">
                                        <h5 class="card-title"><a href='{% url "main:detail" result.object.id %}'>{{ result.object.title }}</a></h5>
                                        <div class="video_detail_info"><span>动画种类：</span>{{ result.object.category }}</div>
                                        <div class="video_detail_info"><span>首播时间：</span>{{ result.object.pub_date }}</div>
                                        <div class="video_detail_info"><span>播放状态：</span>{{ result.object.status }}</div>
                                        <div class="video_detail_info"><span>原作：</span>{{ result.object.author }}</div>
                                        <div class="video_detail_info"><span>剧情类型：</span>
                                            {% for label in result.object.label.all %}
                                            {{ label }}
                                            {% endfor %}
                                        </div>
                                        <div class="video_detail_info desc"><span>简介：</span>{{ result.object.introduce }}</div>
                                        <div class="video_btns">
                                            <a href='{% url "main:detail" result.object.id %}' class="btn btn-sm btn-secondary me-2">资源详情</a>
                                            <a href='{% url "main:detail" result.object.id %}' class="btn btn-sm btn-danger">在线播放</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                        {% empty %}
                        <div class="common-empty">
                        <div class="common-empty__image">
                            <img src="https://p1.bdxiguaimg.com/origin/1381600020e37ed2a10dd" alt="">
                        </div>
                        <p class="common-empty__description">未搜索到相关数据</p>
                        </div>
                        {% endfor %}
                    {% endif %}
                </div>
            </section>
        </div>
    </div>



{% endblock %}